//
//  KLPeerSrceen.h
//  kularkDemo
//
//  Created by szblsx2 on 2020/4/16.
//  Copyright © 2020 szblsx. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KLAppDefine.h"
@class KLClient;
@class KLPeerLocal;

NS_ASSUME_NONNULL_BEGIN

@interface KLPeerSrceen : NSObject

//房间id
@property (nonatomic, copy) NSString *roomId;
//当前连接流id
@property (nonatomic, copy) NSString *streamId;

/**
*  初始化KLPeerSrceen
*  @param client          信令对象
*  @param factory        连接工厂
*  @param iceServers  ice服务器地址集合
*/
- (instancetype)initWithClient:(KLClient *)client
                         factory:(RTCPeerConnectionFactory *)factory
                      iceServers:(NSArray<RTCIceServer *>*)iceServers;
/**
*  接收到远端answer SDP处理
*  @param sessionDescription    远端sdp描述
*/
- (void)onRemoteDescription:(RTCSessionDescription *)sessionDescription;

/**
*  发送自定义视频数据
*  @param sampleBuffer    视频帧数据
*/
- (void)sendVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer;

@end

NS_ASSUME_NONNULL_END
